package Components.image
{
	import flash.utils.Dictionary;

	public class ActionFileName
	{
		private static var _fileDirectName:Dictionary = new Dictionary();
		_fileDirectName["上"] = "d0";
		_fileDirectName["下"] = "d4";
		_fileDirectName["右"] = "d2";
		_fileDirectName["右上"] = "d1";
		_fileDirectName["右下"] = "d3";
		
		private static var _fileActionName:Dictionary = new Dictionary();
		_fileActionName["站立"] = "stand";
		_fileActionName["攻击"] = "attack";
		_fileActionName["跑动"] = "walk";
		_fileActionName["默认"] = "defult";
		_fileActionName["受击"] = "hurt";
		_fileActionName["死亡"] = "die";
		_fileActionName["施法"] = "magic";
		_fileActionName["坐下"] = "sit";
		_fileActionName["技能1"] = "skillA";
		_fileActionName["技能2"] = "skillB";
		_fileActionName["技能3"] = "skillC";
		_fileActionName["技能4"] = "skillD";
		
		public static function clearFileActions():void
		{
			_fileActionName = new Dictionary();
		}
		
		public static function setFileActionName( action:String, export:String ):void
		{
			_fileActionName[action] = export;
		}
		
		public static function hasDirectFile( name:String ):Boolean
		{
			return _fileDirectName[name] != null;
		}
		
		public static function hasActionFile( name:String ):Boolean
		{
			return _fileActionName[name] != null;
		}
		
		public static function getOutDirectionName( direct:String ):String
		{
			return _fileDirectName[direct];
		}
		
		public static function getOutActionName( action:String ):String
		{
			return _fileActionName[action];
		}
		
		public static function get fileActionName():Dictionary
		{
			return _fileActionName;
		}
		
		public static function get fileActionProvider():Array
		{
			var arr:Array = new Array();
			for( var i:String in _fileActionName )
			{
				arr.push( i );
			}
			arr.sort();
			return arr;
		}
		
		public static function get fileNameProvider():Array
		{
			var arr:Array = new Array();
			for( var i:String in _fileDirectName )
			{
				arr.push( i );
			}
			arr.sort();
			return arr;
		}
			
		public function ActionFileName()
		{
		}
	}
}